package com.sora.sys.service.impl;


import com.sora.basic.service.impl.BaseServiceImpl;
import com.sora.sys.domain.DictionaryType;
import com.sora.sys.mapper.DictionaryDetailMapper;
import com.sora.sys.mapper.DictionaryTypeMapper;
import com.sora.sys.service.IDictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 业务实现类：部门
 */
@Service
public class DictionaryTypeServiceImpl extends BaseServiceImpl<DictionaryType> implements IDictionaryTypeService {

    @Autowired
    private DictionaryTypeMapper dictionaryTypeMapper;
    @Autowired
    private DictionaryDetailMapper dictionaryDetailMapper;


    @Override
    public void del(Long id) {
        dictionaryDetailMapper.delByTypeId(id);
        dictionaryTypeMapper.del(id);
    }

    @Override
    public void batchDel(List<Long> ids) {
        dictionaryDetailMapper.delByTypeIds(ids);
        dictionaryTypeMapper.batchDel(ids);
    }
}
